#include <iostream>
#include <dirent.h>
int main(){
    DIR * dirp = opendir(".");
    dirent* direntp;
    while((direntp = readdir(dirp)) != nullptr){
        std::cout << "name = " << direntp->d_name << "\n"; 
    }
    direntp = readdir(dirp);
    std::cout << "name = " << direntp->d_name << "\n"; 
    return 0;
}

